home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 526-550 / disk_539 / simplerexx / test.rexx < prev   
OS/2 REXX Batch file  |  1992-05-06  |  1KB  |  79 lines

  1. /*
  2.  * SimpleRexx test...
  3.  *
  4.  * You need to run the SimpleRexxExample first...
  5.  */
  6.  
  7. Options FailAt 100
  8.  
  9. Options Results
  10.  
  11. /*
  12.  * Try to read the window title bar
  13.  */
  14. Address EXAMPLE_1 ReadTitle
  15.  
  16. if rc > 0 then say 'Error was 'EXAMPLE.LASTERROR
  17. else say 'Window title is 'Result
  18.  
  19. /*
  20.  * Bad WINDOW command...
  21.  */
  22. Address EXAMPLE_1 "Window Display"
  23.  
  24. if rc > 0 then say 'Error was 'EXAMPLE.LASTERROR
  25. else say 'Window is now open'
  26.  
  27. /*
  28.  * Open the window
  29.  */
  30. Address EXAMPLE_1 "Window Open"
  31.  
  32. if rc > 0 then say 'Error was 'EXAMPLE.LASTERROR
  33. else say 'Window is now open'
  34.  
  35. /*
  36.  * Open the window
  37.  */
  38. Address EXAMPLE_1 "Window Open"
  39.  
  40. if rc > 0 then say 'Error was 'EXAMPLE.LASTERROR
  41. else say 'Window is now open'
  42.  
  43. /*
  44.  * Try to read the window title bar
  45.  */
  46. Address EXAMPLE_1 ReadTitle
  47.  
  48. if rc > 0 then say 'Error was 'EXAMPLE.LASTERROR
  49. else say 'Window title is 'Result
  50.  
  51. /*
  52.  * Hide the window
  53.  */
  54. Address EXAMPLE_1 "Window Close"
  55.  
  56. if rc > 0 then say 'Error was 'EXAMPLE.LASTERROR
  57. else say 'Window is now closed'
  58.  
  59. /*
  60.  * Try to hide the window again
  61.  */
  62. Address EXAMPLE_1 "Window Close"
  63.  
  64. if rc > 0 then say 'Error was 'EXAMPLE.LASTERROR
  65. else say 'Window is now closed'
  66.  
  67. /*
  68.  * Send a command that does not exist
  69.  */
  70. Address EXAMPLE_1 Junk
  71.  
  72. if rc > 0 then say 'Error was 'EXAMPLE.LASTERROR
  73. else say 'The command worked!!!'
  74.  
  75. /*
  76.  * Quit the program...
  77.  */
  78. Address EXAMPLE_1 Quit
  79.